package com.example.njupt.helper;

import android.content.Context;

/**
 * Author:      mwang
 * Create Date: Created in 2021/4/23 19:23
 * Update Date:
 * Modified By:
 * Description:
 */
public class DimenUtils {

    public static int dip2px(Context context, float dpValue) {
        float scale = context.getResources().getDisplayMetrics().density;
        return (int) (dpValue * scale + 0.5f);
    }
}
